package com.songJie.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @Description
 * @Author SJ
 * @Date 2023/2/20 9:25
 */
@RestController
public class BeiwangController {
    @Autowired
    BeiwangRepository beiwangRepository;

    @GetMapping("/add_beiwang")
    public void addBeiwang(Beiwang_SongJie beiwang_songJie) {
        beiwang_songJie.setDate(new Date());
        beiwangRepository.save(beiwang_songJie);
    }
}
